﻿using Orchard.Environment.Extensions;
using Orchard.Localization;
using Orchard.UI.Navigation;

namespace FruitCake.ContactPage
{
    [OrchardFeature("FruitCake.ContactPage")]
    public class AdminMenu : INavigationProvider
    {
        public Localizer T { get; set; }
        public string MenuName { get { return "admin"; } }

        public void GetNavigation(NavigationBuilder builder)
        {
            builder.Add(T("Contact Requests"), "4", 
                menu => menu
                    .Add(T("List"), "1.0", item => item.Action("Index", "Admin", new { area = "FruitCake.ContactPage" }).Permission(Permissions.ManageContactRequests))
                );
        }
    }
}